<template>
  <div>
    <el-button>{{ title }}--title</el-button>
    <slot name="mem"></slot>
    <template v-for="(e, i) in contents">
      <el-button type="success" :key="i">
        {{ e }}
      </el-button>
    </template>
    <slot name="cpu" :a="a" :b="b"></slot>
    <el-button type="warning" @click="insert">新增</el-button>
    <slot></slot>
  </div>
</template>

<script>
/**
 * 页面核心数据结构体说明文档
 *
 *
 */
// import New from './components/New.vue';
export default {
  name: "InnerFour",
  components: {
    // New,Old,
  },
  props: {
    sampleP: {
      type: Number,
      default: 0,
    },
    title: {
      type: String,
      default: "son",
    },
  },
  data() {
    return {
      a: "sister",
      b: "brother",
      contents: [100, 99],
    };
  },
  computed: {
    // sampleC() {
    //     return this.sampleD+'--';
    // }
  },
  created() {},
  mounted() {},
  methods: {
    sampleM() {},
    insert() {
      let r = Math.floor(Math.random() * 100);
      this.contents.push(r);
      let s = this.contents.length;
      this.$message.success("长度：" + s);
      this.$emit("post-insert", s);
      //可以随意自定义一些事件
      // that.postInsert(s,88,888)
    },
  },
  watch: {
    // sampleC(newValue, oldValue) {
    //
    // }
  },
};
</script>

<!--<style scoped>-->
<style lang="scss" scoped></style>
